package com.example.fw;

import java.util.Properties;

public class ApplicationManager {

	private static ApplicationManager singleton;
	private WebDriverHelper webDriverHelper;
	private Properties props;
		private FcpHelper fcpHelper;
		private NavigationHelper NavigationHelper;

	public static ApplicationManager getInstance() {
		if (singleton == null) {
			singleton = new ApplicationManager();
		}
		return singleton;
	}

	public void stop() {
		if (webDriverHelper != null) {
			webDriverHelper.stop();
		}

	}

	public WebDriverHelper getWebDriverHelper() {
		if (webDriverHelper == null) {
			webDriverHelper = new WebDriverHelper(this);
		}
		return webDriverHelper;
	}




public void setProperties(Properties props) {
		this.props = props;
	}

	public String getProperty(String key) {
		return props.getProperty(key);
	}

	public String getProperty(String key, String defaultValue) {
		return props.getProperty(key, defaultValue);
	}

	public FcpHelper getFcpHelper() {
		if (fcpHelper == null) {
			fcpHelper = new FcpHelper(this);
		}
		return fcpHelper;
	}

	public NavigationHelper getNavigationHelper() {
		if (NavigationHelper == null) {
			NavigationHelper = new NavigationHelper(this);
		}
		return NavigationHelper;
	}

	

	
}
